/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.Objects;
/*     */ import java.util.concurrent.ConcurrentHashMap;
/*     */ import net.minecraft.item.Item;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.nbt.NBTTagCompound;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class aja
/*     */ {
/*  18 */   public static ConcurrentHashMap<eos/moe/dragoncore/lia, fj<Long, Long>> g = new ConcurrentHashMap<>();
/*     */   
/*     */   public static fj<Long, Long> v(ItemStack a) {
/*  21 */     g.entrySet().removeIf(a -> (System.currentTimeMillis() > ((Long)((fj)a.getValue()).v()).longValue()));
/*     */     
/*  23 */     List<fj> list = new ArrayList();
/*     */     
/*  25 */     for (Map.Entry<eos/moe/dragoncore/lia, fj<Long, Long>> entry : g.entrySet()) {
/*  26 */       eos/moe/dragoncore/lia eos/moe/dragoncore/lia = (eos/moe/dragoncore/lia)entry.getKey();
/*  27 */       int i = 0;
/*  28 */       if (!eos/moe/dragoncore/lia.h(eos/moe/dragoncore/lia).isEmpty()) {
/*  29 */         ResourceLocation resourceLocation = (ResourceLocation)Item.field_150901_e.func_177774_c(a.func_77973_b());
/*  30 */         if (resourceLocation != null && !eos/moe/dragoncore/lia.h(eos/moe/dragoncore/lia).toUpperCase().equals(resourceLocation.func_110623_a().toUpperCase()))
/*     */           continue; 
/*  32 */         i++;
/*     */       } 
/*  34 */       if (!eos/moe/dragoncore/lia.z(eos/moe/dragoncore/lia).isEmpty()) {
/*  35 */         if (!eos/moe/dragoncore/lia.z(eos/moe/dragoncore/lia).equals(a.func_82833_r()))
/*     */           continue; 
/*  37 */         i++;
/*     */       } 
/*  39 */       if (!eos/moe/dragoncore/lia.v(eos/moe/dragoncore/lia).isEmpty()) {
/*  40 */         List<String> list1 = ve.v(a, false);
/*  41 */         String str = String.join("|~|", (Iterable)list1);
/*  42 */         if (!eos/moe/dragoncore/lia.v(eos/moe/dragoncore/lia).equals(str))
/*     */           continue; 
/*  44 */         i++;
/*     */       } 
/*  46 */       if (!eos/moe/dragoncore/lia.v(eos/moe/dragoncore/lia).isEmpty()) {
/*  47 */         NBTTagCompound nBTTagCompound = a.func_77978_p();
/*  48 */         if (nBTTagCompound == null) {
/*     */           continue;
/*     */         }
/*  51 */         boolean bool = false;
/*  52 */         for (Map.Entry entry1 : eos/moe/dragoncore/lia.v(eos/moe/dragoncore/lia).entrySet()) {
/*  53 */           String str = v(nBTTagCompound, (String)entry1.getKey());
/*  54 */           if (!str.equals(entry1.getValue())) {
/*  55 */             bool = true;
/*     */             break;
/*     */           } 
/*     */         } 
/*  59 */         if (bool)
/*     */           continue; 
/*  61 */         i++;
/*     */       } 
/*  63 */       list.add(new fj<>(Integer.valueOf(i), entry.getValue()));
/*     */     } 
/*  65 */     list.sort((a, fj1) -> ((Integer)fj1.z()).intValue() - ((Integer)a.z()).intValue());
/*  66 */     if (list.size() == 0)
/*  67 */       return null; 
/*  68 */     return (fj<Long, Long>)((fj)list.get(0)).v();
/*     */   }
/*     */   
/*     */   public static class eos/moe/dragoncore/lia {
/*     */     private String i;
/*     */     private String w;
/*     */     private String q;
/*     */     private Map<String, String> g;
/*     */     
/*     */     public eos/moe/dragoncore/lia(String str1, String str2, String str3, Map<String, String> map) {
/*  78 */       this.i = str1;
/*  79 */       this.w = str2;
/*  80 */       this.q = str3;
/*  81 */       this.g = map;
/*     */     }
/*     */ 
/*     */     
/*     */     public boolean equals(Object object) {
/*  86 */       if (this == object) return true; 
/*  87 */       if (object == null || getClass() != object.getClass()) return false; 
/*  88 */       eos/moe/dragoncore/lia eos/moe/dragoncore/lia1 = (eos/moe/dragoncore/lia)object;
/*  89 */       return (Objects.equals(this.i, eos/moe/dragoncore/lia1.i) && 
/*  90 */         Objects.equals(this.w, eos/moe/dragoncore/lia1.w) && 
/*  91 */         Objects.equals(this.q, eos/moe/dragoncore/lia1.q) && 
/*  92 */         Objects.equals(this.g, eos/moe/dragoncore/lia1.g));
/*     */     }
/*     */ 
/*     */     
/*     */     public int hashCode() {
/*  97 */       return Objects.hash(new Object[] { this.i, this.w, this.q, this.g });
/*     */     }
/*     */   }
/*     */   
/*     */   public static String v(NBTTagCompound a, String str) {
/* 102 */     String[] arrayOfString = str.split("\\.");
/*     */     
/* 104 */     NBTTagCompound nBTTagCompound = a;
/* 105 */     for (int i = 0; i < arrayOfString.length - 1; i++) {
/* 106 */       nBTTagCompound = nBTTagCompound.func_74775_l(arrayOfString[i]);
/*     */     }
/* 108 */     return nBTTagCompound.func_74779_i(arrayOfString[arrayOfString.length - 1]);
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\aja.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */